package com.hello.sky.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hello.sky.annotation.AutoFill;
import com.hello.sky.enmu.OperationType;
import com.hello.sky.model.dto.PasswordEditDTO;
import com.hello.sky.model.entity.Employee;
import com.hello.sky.model.vo.UserReportVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 员工信息 Mapper 接口
 * </p>
 *
 * @author D
 */
@Mapper
public interface EmployeeMapper extends BaseMapper<Employee> {

    Employee login(Employee employee);

    void editPassword(PasswordEditDTO passwordEditDTO);

    @AutoFill(OperationType.UPDATE)
    void updateStatusById(@Param("status") Integer status, @Param("id") Long id);

    @AutoFill(OperationType.INSERT)
    void addEmp(@Param("employee") Employee employee);

    Employee getEmpById(@Param("id") Long id);

    @AutoFill(OperationType.UPDATE)
    void updateEmp(@Param("employee") Employee employee);

    Employee getByUsername(@Param("username") String username);
}
